

package com.maoshi.shop.distribution.comment.model;

import com.baomidou.mybatisplus.annotation.*;
import com.maoshi.shop.distribution.comment.vo.DistributionUserVO;
import lombok.Data;

@Data
@TableName( "tz_distribution_user_wallet")
public class DistributionUserWallet {
    /**
     * 分销员钱包id
     */
    @TableId
    private Long walletId;

    /**
     * 分销员id
     */
    private Long distributionUserId;

    /**
     * 待结算金额(用户付款后 增加该金额,结算时减少该金额,取消订单或退货减少该金额)
     */
    private Double unsettledAmount;

    /**
     * 可提现金额(用户收货后或者维权期过后增加该金额,提现减少该金额)
     */
    private Double settledAmount;

    /**
     * 积累收益(用户收货后或者维权期过后增加该金额,提现不减少该金额)
     */
    private Double addupAmount;

    /**
     * 失效金额(用户取消订单或退货增加该金额)
     */
    private Double invalidAmount;

    /**
     * 乐观锁
     */
    @Version
    private Integer version;

    /**
     * 钱包状态( 0未生效(分销审核未通过) 1正常)
     */
    private Integer state;

    /**
     * 关联分销员
     */
    @TableField(exist = false)
    private DistributionUserVO distributionUser;


}
